﻿#ifndef CTCPSOCKETCLIENT_H
#define CTCPSOCKETCLIENT_H

#include <QObject>
#include <QTimer>
#include <QtCore/QHash>
#include <QtCore/QByteArray>
#include <QTcpSocket>
#include <QUrl>
#include <QFile>

class TcpSocket : public QTcpSocket
{
    Q_OBJECT
public:
    explicit TcpSocket(QObject *parent = nullptr);
    ~TcpSocket();

    void connectTcpServer(const QString& ip, quint16 port);

Q_SIGNALS:
    void debugsocketmessage(TcpSocket *psocket,QString message);

public:
    void send(QString message);
private slots:
    void OnReadyRead();
};

#endif // CWEBSOCKETCLIENT_H
